import unittest
from google.appengine.ext import db
from Common.CompanyOrg import Company
from Common.DuplicatedInstanceError import DuplicatedInstanceError


class ModelTest(unittest.TestCase):

  def test_create_Company(self):
    # Populate test entities.
    try:
        c = Company(key_name="testname",
                    CompanyName="testname")
        c.TransactionPut()
    except DuplicatedInstanceError:
        return

#  def tearDown(self):
#    # There is no need to delete test entities.
#    pass
#
#  def test_new_entity(self):
#    entity = model.MyEntity(name='Foo')
#    self.assertEqual('Foo', entity.name)
#
#  def test_saved_enitity(self):
#    entity = model.MyEntity(name='Foo')
#    key = entity.put()
#    self.assertEqual('Foo', db.get(key).name)
#
#  def test_setup_entity(self):
#    entity = db.get(self.setup_key)
#    self.assertEqual('Bar', entity.name)


